<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>社区问答</title>

    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/index.css" rel="stylesheet" type="text/css">
    <link href="/styles/community.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script type="text/javascript" src="/js/system/index.js"></script>
    <script type="text/javascript" src="/js/plugins/jqPaginator/jq-paginator.min.js"></script>
    <script>
        $(function () {
            $.ajax({
                type: "POST",
                url: "/questions/rank",
                data: {
                    type: 1
                },
                success: function(data) {
                    $('._j_rank_list').append(data)


                }
            });
        })
        $(function () {


            $('._j_rank_change_flag').click(function () {

                var type=   $(this).attr('data')
                $.ajax({
                    type: "POST",
                    url: "/questions/rank",
                    data: {
                        type: type
                    },
                    success: function(data) {
                        $('._j_rank_list').html(data)


                    }
                });

            })
        })
        </script>
</head>
<body style="position:relative;">
<#assign currentNav="question">
<#include "../common/navbar.ftl">
<div class="wrapper wrapper-new" data-cs-t="wenda">
    <div class="col-main">
        <div class="i-main">
            <div class="mt-nav clearfix i_link">
                <a href="../questions/wenda/">问答首页</a>
                <em></em>
                <div class="drop-mine _j_crumb_my">
                    <a class="drop-hd" href="../questions/wenda/" target="_blank"><i></i>问答</a>
                </div>

    </span>
        </div>
    </div>
    <div class="col-side">
        <div class="i-ask">
            <a href="/questions/public" class="btn-ask btn-ask2" target="_blank"><i></i>我要提问</a>
        </div>

        <div class="wrapper wrapper-new">
            <div class="col-main">
                <div class="newcate-wrap _j_qa_list">
                    <div class="bd newcate-bd">
                        <ul class="_j_pager_box">
                             <#list pageInfo.list as t>
                            <li class="item clearfix _j_question_item" data-qid="793682">
                                <div class="title">
                                    <a href="javascript:;" target="_blank">${t.title!}</a> </div>
                                <div class="container">
                                    <div class="avatar"><a href="javascript:;" target="_blank" class="_j_filter_click"><img
                                            class="_j_filter_click"
                                            src="${(t.userInfo.headImgUrl)!}"></a>
                                    </div>
                                    <div class="user-info">
                                        <a class="name _j_filter_click" href="javascript:;" target="_blank">${(t.userInfo.nickname)!}</a>
                                    </div>
                                    <div class="desc clearfix">
                                        <img src="${t.img!}" width="150" height="100">
                                        <p>
                                            ${t.content!}
                                        </p>
                                    </div>
                                    <div class="tags">
                                        <a class="a-tag _j_filter_click" href="javascript:;" target="_blank">${(t.questionsTag.name)!}</a>
                                    </div>
                                    <div class="operate">
                                        <div class="mdd"><a href="javascript:;" class="_j_filter_click" target="_blank"><i
                                                class="_j_filter_click"></i>${(t.dest.name)}</a></div>
                                        <div class="cate-share">
                                            <a class="_js_showShare _j_filter_click">分享${t.sharenum!}</a>
                                        </div>
                                        <span class="browse">浏览数${t.viewnum!}</span>
                                        <span class="date">${(t.releaseTime?string("yyyy-MM-dd"))!}</span>
                                    </div>
                                </div>
                            </li>
                             </#list>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="col-side">

                <div class="rank _j_rank" style="margin-top: 20px;">
                    <div class="hd">排行榜<ul class="tab-time">
                        <li class="_j_rank_change_date" data-type="0"><span>今日</span></li>
                        <li class="_j_rank_change_date on" data-type="1"><span>本周</span></li>
                        <li class="_j_rank_change_date" data-type="2"><span>本月</span></li>
                    </ul>
                    </div>
                    <div class="bd">
                        <ul class="tab-num" data-cs-p="rank_list">
                            <li class="_j_rank_change_flag"  data="0">浏览数</li>
                            <li class="_j_rank_change_flag" data-rank="0" data="1">分享数</li>
                            <li class="_j_rank_change_flag" data-rank="1" data="2">回答数</li>
                        </ul>
                        <ul class="rank-list _j_rank_list">
                        <div class="._j_rank_list11" >

                        </div>

                    </div>


                </div>
            </div>
        </div>
        <script>
             $(function () {
              $.get("/questions/rank",tyep:1,function (data) {
                     $('._j_rank_list11').html(data)
                 })

             })
            $(function () {


                $('._j_rank_change_flag').click(function () {

                    var type=   $(this).attr('data')
                    $.get("/questions/rank",type:type,function (data) {
                        $('._j_rank_list11').html(data)
                    })

                })
            })
        </script>
<#include "../common/footer.ftl"/>
</body>
</html>